<!--
 * @Author: your name
 * @Date: 2021-09-15 11:39:17
 * @LastEditTime: 2021-09-15 14:24:15
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\6-jQuery\day04\6-sessionStorage.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>localStorage</title>
</head>

<body>
    <div>

    </div>
</body>
<script>
    var str = "briup1";
    localStorage.setItem("str1", str);
    var str = "briup2";
    localStorage.setItem("str2", str);
    var str = "briup3";
    localStorage.setItem("str3", str);
    console.log(localStorage.length); //3 
    console.log(localStorage.key(1)); //str2
    sessionStorage.removeItem("str2");
    //localStorage.clear();
</script>

</html>